﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QLPKWeb.Models.FormBean.DanhMucChungModel.TypeVoucherForm>" %>

<%@ Import Namespace="QLPKWeb.Models.LinQ.DanhMucChung" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<%@ Import Namespace="DONGACS.DTO" %>
<%@ Import Namespace="System.Web.Mvc.Html" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/DanhMucChung/TypeVoucher.js") %>"></script>
    
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            $("#TypeVoucherSearch").focus();
        });
        $(document).ready(function () {
            selectMenu("danhmucchung-TypeVoucher");
            $("#danhmucchung-TypeVoucher").parent().attr("class", "expanded");
        });
    </script>

    <form id="form" method="post" action="#">
    
    <input type="hidden" id="Id" name="Id" value="<%=Model.Id %>"/>
    <%=Html.Hidden("PageNumber", Model.PageNumber)%>

        <div class="box round first fullpage">
            <h2>Type Voucher</h2>
		
		
            <table class="data display datatable">
                <tr>
                    <td colspan="2" class="first">
                        &nbsp;<b></b>
                    </td>
                    <td colspan="2" class="first" align="right">
                        <%--<%=Html.TextBox("TypeVoucherSearch", "", new { @size = 50, @onkeypress = "if (event.keyCode==13) { return DoSearch(); }" })%>
                        <img onclick="javascript:DoSearch();" style="vertical-align: middle; cursor:pointer" src="<%=ResolveUrl("~/Content/ImagesAdmin/search_icon.gif")%>"
                            alt="Tìm kiếm Nơi luu trữ" title="Tìm kiếm Nơi luu trữ"/>--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                         
                        <table cellspacing="0" cellpadding="0" class="data display datatable">
                            <tr class="title">
                                <td style="border: 1px solid #ddd "class="first" width="20%" align="center">
                                    <strong>ID</strong>
                                </td>
                                <td style="border: 1px solid #ddd ">
                                    <strong>TypeVoucher</strong>
                                </td>    
                                                               
                            </tr>
                            <%--Danhd Muc Đơn vị List--%>

                            <%
                                
                            IList<dm_TypeVoucher> TypeVoucherList = Model.TypeVoucherPagedList;

                            foreach (dm_TypeVoucher item in TypeVoucherList)
                            {
                            %>
                            <tr class="item_row" onclick="javascript:highlight(this);EditTypeVoucherAjax(<%=item.Id%>);">
                                <td style="border: 1px solid #ddd "class="first" align="center">
                                    <%=item.Id%>
                                </td>
                                <td style="border: 1px solid #ddd "align="left">
                                    <%=item.Ten%>&nbsp;
                                </td>
                                
                            </tr>
                            <%}
                            %>
                            <tr class="border_bottom">
                                <td class="first" style="background: #DDDDDD">
                                </td>
                                <td class="last" colspan="7" align="right" style="background: #DDDDDD; padding-right: 10px">
                                     <%
                                         PagerOptions pagerOptions = new PagerOptions();
                                         QLPKWeb.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate
                                             = new QLPKWeb.BussinessDelegate.CommonDelegate.CommonDelegate();
                                         CommonDelegate.ChangeTextPaging(pagerOptions, string.Empty);
                                     %>
                                    <div><%=Html.Pager(Model.TypeVoucherPagedList,pagerOptions) %></div>
                                    <%=Html.Hidden("PageNumber", Model.PageNumber)%>
                                </td>
                            </tr>
                            <%--dã xóa--%>
                        </table>
                       
                    </td>
                </tr>
            </table>
           
            <table class="data display datatable">
                    
                    <tr>
                        <td colspan="2">
                            <%--Thông Báo--%>
                            <%
                                if (!string.IsNullOrEmpty(Model.MessageCreateTypeVoucher))
                                {
                            %>
                            <div id="MessageCreateTypeVoucher" style="font-size: 12px; color: Blue; font-weight: bold">
                                <%=Model.MessageCreateTypeVoucher%></div>
                            <%
                                }
                            %>
                            <%
                                if (!string.IsNullOrEmpty(Model.MessageEditTypeVoucher))
                                {
                            %>
                            <div id="MessageEditTypeVoucher" style="font-size: 12px; color: Blue; font-weight: bold">
                                <%=Model.MessageEditTypeVoucher%></div>
                            <%
                                }
                            %>
                            <%--end--%>
                        </td>
                        <td align="right">
                            <input type="button"class="btn btn-grey" value="Tạo/Cập nhật" onclick="DoCreateOrEdit()" />
                            <input type="button"class="btn btn-grey" value="Tạo mới" onclick="javascript:DoNew();" />
                            <input type="button"class="btn btn-grey" value="Xóa" onclick="javascript:DoDelete();" />
                            <input type="button"class="btn btn-grey" value="Hủy thay đổi" onclick="javascript:DoReset();" />
                        </td>
                    </tr>
                    
                    
                    </table >
                    <table class="table_input">
                    <%--<tr>
                        <td>
                            ID :
                        </td>
                        <td>
                            <span id="showId" style="line-height:30px"><%=Model.Id %></span>
                        </td>
                    </tr>--%>
                    <tr>
                        <td style="width: 20%; vertical-align:middle;">
                            <b>Tên type:</b>
                        </td>
                        <td>
                            <input type="text" size="70" value="<%=Model.Ten%>" id="Ten" name="Ten"/>
                            <div id="TenMessage" class="red"></div>
                        </td>
                    </tr>
                    
                    <%--<tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4" align="right">
                            <input type="button" value="Tạo/Cập nhật" onclick="DoCreateOrEdit()" />
                            <input type="button" value="Tạo mới" onclick="javascript:DoNew();" />
                            <input type="button" value="Xóa" onclick="javascript:DoDelete();" />
                            <input type="button" value="Hủy thay đổi" onclick="javascript:DoReset();" />
                        </td>
                    </tr>--%>
                </table>
           
       <%-- </div>--%>
    </div>
    <%--<%Html.EndForm(); %>--%>

    </form>
</asp:Content>
